<div class="dux-tools">
  <div class="bread-head">后台菜单管理 <span class="small">管理后台菜单</span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__"> 菜单列表</a> </div>
    <?php if(model('user_group')->model_power('category','add')){ ?>
    <div class="button-group float-right"> <a class="button button-small bg-dot icon-plus dropdown-toggle"> 添加 <span class="downward"></span></a>
      <ul class="drop-menu pull-right">
        <li><a href="__APP__/adminmenu/add">添加后台菜单</a></li>
      </ul>
    </div>
    <?php } ?>
  </div>
</div>
<div class="admin-main">
    <div class="panel dux-box">
      <div class="table-responsive">
        <table id="table" class="table table-hover ">
          <tbody>
            <tr>
              <th width="80">编号</th>
              <th width="*">菜单名称</th>
              <th width="*">菜单显示</th>
              <th width="100">操作</th>
            </tr>
              <!--foreach:{$list $vo}-->
              <tr>
                <td>{$vo.id}</td>
                <td>{$vo.cname}</td>
                <td>
                <!--if:{$vo['status']==1}-->
                <font color=green><b>√</b></font>
                <!--{else}-->
                <font color=red><b>×</b></font>
                <!--{/if}-->
                </td>
                <td>
                <?php if($edit_power){ ?>
                <a class="button bg-blue button-small icon-pencil" href="__APP__/adminmenu/edit/id-{$vo.id}" title="修改"></a>
                <?php } ?>
                <?php if($del_power){ ?>
                <a class="button bg-red button-small icon-trash-o js-del"  href="javascript:void(0);" onclick="del('__APP__/adminmenu/del','{$vo.id}',this)" title="删除"></a>
                <?php } ?>
                
                 </td>
              </tr>
              <!--{/foreach}-->
          </tbody>
        </table>
      </div>
    </div>
</div>
<script>
//栏目形象图
$(".class_pic").powerFloat({
    targetMode: "ajax"
});
//栏目删除
function del(url,cid,obj) {
	var obj;
	ajaxpost({
		name:'删除菜单!',
		url:url,
		data:{cid:cid},
		tip:true,
		success:function(){
			$(obj).parent().parent().remove();
		}
	});
}
</script>
